namespace LuceneSearch.ContactApp.Indexing
{
    public static class PropertyValueExtensions
    {
        public static string GetIndexValue(this object obj, string propertyName)
        {
            var value = obj.GetType().GetProperty(propertyName).GetValue(obj, null);
            return value == null ? "" : value.ToString();
        }
    }
}